<?php

namespace App\Http\Controllers\Activity;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;

class GoodsStatusChangeController extends Controller
{

    public function index(){

        $all = $this->all;
        return $this->setReturnJson(-1,'商品状态暂时不可修改');

        try{
            DB::table('lottery_goods')->where('goods_id',$all['goods_id'])->update(['is_delete'=>$all['is_delete']]);
            return $this->setReturnJson(0,'状态修改完成');
        }catch (\Exception $e){
            Log::error(GoodsStatusChangeController::class,['msg' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine()]);
            return $this->setReturnJson(-1,'处理异常，请刷新页面重试');
        }

    }

}
